Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Windows.Forms

Public Class FrmCrSoChiPhi
    Private trang As Integer
    Private thangnam As Date
    Private customerReport As ReportDocument

    Private Sub FrmCrSoChiPhi_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        frmLoading.Show()
        Dim sqlQuery As String = "SELECT *, ngayGS as ngayCT from tbl_dot_temp_sochiphi "
        Dim reportPath = Application.StartupPath & "\" & "crSoChiPhi.rpt"
        customerReport = New ReportDocument()
        customerReport.Load(reportPath)
        customerReport.SetDataSource(moduleReportConfig.GetDataTable(sqlQuery))
        customerReport.SetParameterValue("trang", trang)
        customerReport.SetParameterValue("TThangnam", thangnam)
        Me.CrNXTTongHopview.ReportSource = customerReport
        frmLoading.Close()
        frmLoading.Dispose()
    End Sub

    Public Sub setThangnam(ByVal s As Date)
        thangnam = s
    End Sub
    Public Sub setTrang(ByVal s As Integer)
        trang = s
    End Sub
End Class
